package com.chenjian.controller;

import com.chenjian.entity.ArticleEntity;
import com.chenjian.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author TC2952
 */
@RestController
public class IndexController {


    @Autowired
    private ArticleService articleServiceImpl;

    @GetMapping(value = "/all")
    public Object index() {
        Page<ArticleEntity> entityPage = articleServiceImpl.findByPage(1, 2);
        return entityPage;
    }
}
